#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int i = 0;
	int j = 0;
	int k = 0;
	int l = 0;
	while(1)
	{
		scanf("%d", &i);
		for (j = 0; j < i; j++)
		{
			if (j == 0 || j == i - 1)
			{
				for (k = 0; k < i; k++)
				{
					printf("* ");
				}
			}
			if ((j < i - 1) && (j > 0))
			{
				printf("* ");
				for (l = 0; l < i - 2; l++)
				{
					printf("  ");
				}
				printf("* ");
			}
			printf("\n");
		}
	}
	return 0;
}

#include <stdio.h>

int main() {
	int i = 10;
	int j = 0;
	int arr[] = { 0 };
	for (j = 0; j < i; j++)
	{
		scanf("%d", &arr[j]);
	}
	for (j; j >= 0; j--)
	{
		printf("%d", arr[j]);
	}
	return 0;
}